//
//  WaterFlowLayout.h
//  UICollectionViewFlowLayoutTest
//
//  Created by Rocky on 16/4/15.
//  Copyright © 2016年 Rocky. All rights reserved.
//

#import <UIKit/UIKit.h>

@protocol WaterFlowLayoutDelegate <NSObject>
//以分栏后的宽度为基准，宽高的按等缩放计算出高度。
-(CGFloat)getNewItemHeight:(NSIndexPath*)indexPath heightForWidth:(CGFloat)width;

@end


@interface WaterFlowLayout :UICollectionViewLayout
//
@property (nonatomic,weak)id<WaterFlowLayoutDelegate>delegate;
@property (nonatomic,assign)NSUInteger colum;//分栏数；
@property(nonatomic, assign)UIEdgeInsets sectionInset;
//@property (nonatomic,assign)CGFloat minimumLineSpacing;//这个定义了每个item在水平方向上的最小间距。
//@property(nonatomic, assign)CGFloat itemSpacing; //item space

@end
